package cn.lwy.example.niit_race.service;

import cn.lwy.example.niit_race.dao.LoginMapper;
import cn.lwy.example.niit_race.pojo.Role;
import cn.lwy.example.niit_race.pojo.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService{

    @Autowired
    LoginMapper loginMapper;

    @Override
    public SysUser findUserByName(String name) {
        return loginMapper.findUserByName(name);
    }

    @Override
    public Role findRoleById(int roleId) {
        return loginMapper.findRoleById(roleId);
    }

    @Override
    public void addUser(SysUser user) {
        loginMapper.addUser(user);
    }
}
